package org.example.service.Impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.example.domain.Area;
import org.example.mapper.AreaMapper;
import org.example.service.AreaService;
import org.example.constant.StoreConstants;


@Service
@CacheConfig(cacheNames = "org.example.service.Impl.AreaServiceImpl")
public class AreaServiceImpl extends ServiceImpl<AreaMapper, Area> implements AreaService{

    @Autowired
    private AreaMapper areaMapper;

    @Override
    @Cacheable(key = StoreConstants.ALL_AREA_KEY)
    public List<Area> queryAllAreaList() {
        return areaMapper.selectList( null);
    }
}
